home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bcdcopyjob.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  3.4 KB  |  118 lines

  1. /* 
  2.  *
  3.  * $Id: k3bcdcopyjob.h 690187 2007-07-20 09:18:03Z trueg $
  4.  * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16.  
  17. #ifndef _K3BCDCOPYJOB_H_
  18. #define _K3BCDCOPYJOB_H_
  19.  
  20. #include <k3bjob.h>
  21. #include "k3b_export.h"
  22.  
  23. namespace K3bDevice {
  24.   class Device;
  25.   class DeviceHandler;
  26. }
  27.  
  28.  
  29. /**
  30.   *@author Sebastian Trueg
  31.   */
  32. class LIBK3B_EXPORT K3bCdCopyJob : public K3bBurnJob
  33. {
  34.   Q_OBJECT
  35.  
  36.  public:
  37.   K3bCdCopyJob( K3bJobHandler* hdl, QObject* parent = 0 );
  38.   ~K3bCdCopyJob();
  39.  
  40.   K3bDevice::Device* writer() const { return m_onlyCreateImages ? 0 : m_writerDevice; }
  41.   K3bDevice::Device* reader() const { return m_readerDevice; }
  42.     
  43.   QString jobDescription() const;
  44.   QString jobDetails() const;
  45.  
  46.  public slots:
  47.   void start();
  48.   void cancel();
  49.  
  50.  public:
  51.   void setWriterDevice( K3bDevice::Device* dev ) { m_writerDevice = dev; }
  52.   void setReaderDevice( K3bDevice::Device* dev ) { m_readerDevice = dev; }
  53.   void setWritingMode( int m ) { m_writingMode = m; }
  54.   void setSpeed( int s ) { m_speed = s; }
  55.   void setOnTheFly( bool b ) { m_onTheFly = b; }
  56.   void setKeepImage( bool b ) { m_keepImage = b; }
  57.   void setOnlyCreateImage( bool b ) { m_onlyCreateImages = b; }
  58.   void setSimulate( bool b ) { m_simulate = b; }
  59.   void setTempPath( const QString& path ) { m_tempPath= path; }
  60.   void setCopies( unsigned int c ) { m_copies = c; }
  61.   void setParanoiaMode( int i ) { m_paranoiaMode = i; }
  62.   void setIgnoreDataReadErrors( bool b ) { m_ignoreDataReadErrors = b; }
  63.   void setDataReadRetries( int i ) { m_dataReadRetries = i; }
  64.   void setIgnoreAudioReadErrors( bool b ) { m_ignoreAudioReadErrors = b; }
  65.   void setAudioReadRetries( int i ) { m_audioReadRetries = i; }
  66.   void setPreferCdText( bool b ) { m_preferCdText = b; }
  67.   void setCopyCdText( bool b ) { m_copyCdText = b; }
  68.   void setNoCorrection( bool b ) { m_noCorrection = b; }
  69.  
  70.  private slots:
  71.   void slotDiskInfoReady( K3bDevice::DeviceHandler* );
  72.   void slotCdTextReady( K3bDevice::DeviceHandler* );
  73.   void slotMediaReloadedForNextSession( K3bDevice::DeviceHandler* dh );
  74.   void slotCddbQueryFinished(int);
  75.   void slotWritingNextTrack( int t, int tt );
  76.   void slotReadingNextTrack( int t, int tt );
  77.   void slotSessionReaderFinished( bool success );
  78.   void slotWriterFinished( bool success );
  79.   void slotReaderProgress( int p );
  80.   void slotReaderSubProgress( int p );
  81.   void slotWriterProgress( int p );
  82.   void slotReaderProcessedSize( int p, int pp );
  83.  
  84.  private:
  85.   void startCopy();
  86.   void searchCdText();
  87.   void queryCddb();
  88.   bool writeNextSession();
  89.   void readNextSession();
  90.   bool prepareImageFiles();
  91.   void cleanup();
  92.   void finishJob( bool canceled, bool error );
  93.  
  94.   K3bDevice::Device* m_writerDevice;
  95.   K3bDevice::Device* m_readerDevice;
  96.   bool m_simulate;
  97.   int m_speed;
  98.   int m_paranoiaMode;
  99.   unsigned int m_copies;
  100.   bool m_keepImage;
  101.   bool m_onlyCreateImages;
  102.   bool m_onTheFly;
  103.   bool m_ignoreDataReadErrors;
  104.   bool m_ignoreAudioReadErrors;
  105.   bool m_noCorrection;
  106.   int m_dataReadRetries;
  107.   int m_audioReadRetries;
  108.   bool m_preferCdText;
  109.   bool m_copyCdText;
  110.   QString m_tempPath;
  111.   int m_writingMode;
  112.  
  113.   class Private;
  114.   Private* d;
  115. };
  116.  
  117. #endif
  118.